package insta.project.player;

public class Audio {

	private String title;
	private String artist;
	private String filename;
	private String imageuri;
	private int audio_id;
	private String album_id;
	private int rating;
	
	public Audio() {}
	

	public Audio(String title, String artist, String filename, String imageuri,
			int audio_id) {
		super();
		this.title = title;
		this.artist = artist;
		this.filename = filename;
		this.imageuri = imageuri;
		this.audio_id = audio_id;
		this.album_id = album_id;
	}
	
	public String getTitle() {
		String filtered = title.replaceAll("[^a-zA-Z0-9]", "");
		if(filtered.length() > 50) {
			filtered = filtered.substring(0, 50)+"...";
		}
		return filtered;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getArtist() {
		String filtered = artist.replaceAll("[^a-zA-Z0-9]", "");
		if(filtered.length() > 50) {
			filtered = filtered.substring(0, 50)+"...";
		}
		return filtered;
	}
	public int getAudio_id() {
		return audio_id;
	}
	public String getAlbum_id() {
		return album_id;
	}
	public void setArtist(String artist) {
		this.artist = artist;
	}
	public String getFilename() {
		return filename;
	}
	public void setFilename(String filename) {
		this.filename = filename;
	}
	public String getImageuri() {
		return imageuri;
	}
	public void setImageuri(String imageuri) {
		this.imageuri = imageuri;
	}
	public void setAudio_id(int audioid) {
		this.audio_id = audioid;
	}
	public void setAlbum_id(String albumid) {
		this.album_id = albumid;
	}


	public int getRating() {
		return rating;
	}


	public void setRating(int rating) {
		this.rating = rating;
	}
}
